<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="redis" uri="http://www.shopjsp.com/redisTag/functions" %>
<c:set var="basePath" value="${redis:getSysConfig('base_path_back')}"/>
<script type="text/javascript">
    /**
     * 查看粉丝用户信息详情
     */
    function detailInfo(id){
        $.ajax({
            type: "POST",
            dataType: "JSON",
            url: "${basePath}/back/wx/publicNumberSendMsgInfo/getSendMessageInfoObject.sjson",
            data: {sendMsgInfoId:id},
            success: function(result){
                var data = JSON.parse(result.data);
                /**重置详情页中所有html展示信息**/
                resetDetailTable("detailTable");
                /**设置展示信息**/
                $("#d_publicNumberName").html(data.publicNumberName);
                $("#d_fanUserName").html(data.fanUserName);
                if(data.sendMsgTypeEnumId=="1"){$("#d_sendMsgTypeEnumId").html("文本消息");
                }else if(data.sendMsgTypeEnumId=="2"){$("#d_sendMsgTypeEnumId").html("图片消息");
                }else if(data.sendMsgTypeEnumId=="3"){$("#d_sendMsgTypeEnumId").html("语音消息");
                }else if(data.sendMsgTypeEnumId=="4"){$("#d_sendMsgTypeEnumId").html("视频消息");
                }else if(data.sendMsgTypeEnumId=="5"){$("#d_sendMsgTypeEnumId").html("地理位置消息");
                }else if(data.sendMsgTypeEnumId=="6"){$("#d_sendMsgTypeEnumId").html("链接消息");
                }else if(data.sendMsgTypeEnumId=="7"){$("#d_sendMsgTypeEnumId").html("事件消息");
                }else if(data.sendMsgTypeEnumId=="8"){$("#d_sendMsgTypeEnumId").html("语音识别消息");
                }else if(data.sendMsgTypeEnumId=="9"){$("#d_sendMsgTypeEnumId").html("图文消息");
                }
                $("#d_remark").html(data.remark);
                $("#d_sendMsgContent").html(data.sendMsgContent);
                if(data.sendTime!=""&&data.sendTime!=undefined){
                    $("#d_sendTime").html(new Date(data.sendTime).Format("yyyy-MM-dd hh:mm:ss"));
                }
            }
        });
    }
</script>
<!--详情模态框（Modal） -->
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog" style="width:70%">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h5 class="modal-title" id="myModalLabel">公众号发送消息详情</h5>
			</div>
			<div class="modal-body">
				<table id="detailTable" align="center" class="addOrEditTable table table-bordered" style="width:100%;">
					<tr>
						<td class="toright_td" width="150px">公众号名称:</td>
						<td class="toleft_td">&nbsp;&nbsp;<span id="d_publicNumberName"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">粉丝会员名称:</td>
						<td class="toleft_td">&nbsp;&nbsp;<span id="d_fanUserName"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">发送消息类型:</td>
						<td class="toleft_td">&nbsp;&nbsp;<span id="d_sendMsgTypeEnumId"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">备注:</td>
						<td class="toleft_td">&nbsp;&nbsp;<span id="d_remark"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">发送消息内容:</td>
						<td class="toleft_td">&nbsp;&nbsp;<span id="d_sendMsgContent"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">发送时间:</td>
						<td class="toleft_td">&nbsp;&nbsp;<span id="d_sendTime"></span></td>
					</tr>
				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>